package cool.zhoujie.address;

import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import cool.zhoujie.address.databinding.FragmentNewBinding;
import cool.zhoujie.address.viewmodel.NewFragmentViewModel;

public class NewFragment extends Fragment{

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        FragmentNewBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_new, container, false);
        NewFragmentViewModel viewModel = new ViewModelProvider(this).get(NewFragmentViewModel.class);
        binding.setData(viewModel);
        binding.setLifecycleOwner(this);
        return binding.getRoot();
    }
}
